/* Startup Template For TMR0 */ // Sample Interrupt Handler void interrupt() { // Timer0 Interrupt Handler if (INTCON.TMR0IF ==1) // if the Timer 0 interrupt flag is set... { - Place Your Code Here - INTCON.TMR0IE = 1; INTCON.TMR0IF = 0; // clear the interrupt flag } } // Sample Main Setup void main() { // Set Interrupt Enable bits INTCON.TRM0IE = 1; // bit 5 Timer0 Overflow Interrupt Enable // setup the TMR0 configuration registers OPTION_REG.T0CS = 0; // bit 5 TMR0 Clock Source Select bit 0 = Internal Clock (CLKO) 1 = Transition on T0CKI pin OPTION_REG.T0SE = 0; // bit 4 TMR0 Source Edge Select bit 0 = low/high 1 = high/low OPTION_REG.PSA = 1; // bit 3 Prescaler Assignment bit... 0 = Prescaler is assigned to the WDT OPTION_REG.PS2 = 0; // bits 2-0 PS2:PS0: Prescaler Rate Select bits OPTION_REG.PS1 = 0; OPTION_REG.PS0 = 0; //Set global Interrupt Enable bits INTCON.GIE = 1; // global interrupt enable while(1) // endless loop { - Place Your Code Here - } }